class Student():
    #类属性创建
    school="北京教育"
    #实例属性
    def __init__(self, name, age):
        self.name = name
        self.age = age
    #实例方法
    def show(self):
        print(f'我叫:{self.name}.今年:{self.age}岁了')
    #类方法
    @classmethod
    def show2(cls):
        print("类方法")

xs1 = Student('dxl','19')
xs2 = Student('zt','13')
xs3 = Student('MB','15')
xs4 = Student('BB','11')

##对类属性重新赋值
Student.school="python教育"

print(Student.school)

list=[xs1,xs2,xs3,xs4]
for i in list:
    #调用实例方法
    print(i.show())
    #调用实例属性
    print(i.name,i.age)